package com.ny.entity;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

@Document(collection = "device")
public class DeviceMongo {
    @Id
    private String id;
    
    @Field("device_id")
    private int deviceId;
    
    @Field("device_sn")
    private String deviceSn;
    
    @Field("device_name")
    private String deviceName;
    
    @Field("device_type")
    private int deviceType;
    
    @Field("room_id")
    private int roomId;
    
    @Field("status")
    private int status;
    
    @Field("protocol")
    private String protocol;
    
    @Field("created_time")
    private Date createdTime;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(int deviceId) {
        this.deviceId = deviceId;
    }

    public String getDeviceSn() {
        return deviceSn;
    }

    public void setDeviceSn(String deviceSn) {
        this.deviceSn = deviceSn;
    }

    public String getDeviceName() {
        return deviceName;
    }

    public void setDeviceName(String deviceName) {
        this.deviceName = deviceName;
    }

    public int getDeviceType() {
        return deviceType;
    }

    public void setDeviceType(int deviceType) {
        this.deviceType = deviceType;
    }

    public int getRoomId() {
        return roomId;
    }

    public void setRoomId(int roomId) {
        this.roomId = roomId;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getProtocol() {
        return protocol;
    }

    public void setProtocol(String protocol) {
        this.protocol = protocol;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    @Override
    public String toString() {
        return "DeviceMongo{" +
                "id='" + id + '\'' +
                ", deviceId=" + deviceId +
                ", deviceSn='" + deviceSn + '\'' +
                ", deviceName='" + deviceName + '\'' +
                ", deviceType=" + deviceType +
                ", roomId=" + roomId +
                ", status=" + status +
                ", protocol='" + protocol + '\'' +
                ", createdTime=" + createdTime +
                '}';
    }
}